<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>循环控制语句</title>

<!--    和c++一样-->
    <style>
        td{
            border: gray solid 1px;
        }
    </style>

    <script>

        document.write("<table  aligns='center'>")

        for (var i=1;i<10;i++){
            document.write("<tr>")
            for (var j = 1; j<=i;j++){
                var sum=i*j;

                document.write("<td>");
                document.write(i +"*"+ j +"="+sum+" "+"&nbsp;&nbsp;&nbsp");
                document.write("</td>");
            }
            // document.write("<br>");
            document.write("</tr>")
        }

        document.write("</table>")
    </script>

</head>
<body>

</body>
</html>